﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure.Core.Loging
{
    /// <summary>
    /// 日志服务
    /// </summary>
    public class LogService
    {
        public static ILogger GetInstance() {
            return GetInstance(LogType.Text);
        }

        public static ILogger GetInstance(LogType logType)
        {
            var logInstance = default(ILogger);
            switch (logType)
            {
                case LogType.Text: logInstance = new TextLog(); break;
                case LogType.Mongo: logInstance = new EmptyLog(); break;
                case LogType.Empty: logInstance = new EmptyLog(); break;
                default: logInstance = new EmptyLog(); break;
            }

            return logInstance;
        }
    }
}
